package com.example.websocketserver.configuration.client;

import org.springframework.messaging.tcp.reactor.ReactorNettyCodec;
import org.springframework.messaging.tcp.reactor.ReactorNettyTcpClient;
import reactor.netty.tcp.TcpClient;

import java.util.function.Function;

/**
 * The type MsgCenterReactorNettyTcpClient.
 *
 * @author liulei.
 * @version 1.0
 */
public class MsgCenterReactorNettyTcpClient extends ReactorNettyTcpClient<byte[]> {


    /**
     * Instantiates a new Msg center reactor netty tcp client.
     *
     * @param host  the host
     * @param port  the port
     * @param codec the codec
     */
    public MsgCenterReactorNettyTcpClient(String host, int port, ReactorNettyCodec<byte[]> codec) {
        super(host, port, codec);
    }

    /**
     * Instantiates a new Msg center reactor netty tcp client.
     *
     * @param clientConfigurer the client configurer
     * @param codec            the codec
     */
    public MsgCenterReactorNettyTcpClient(Function<TcpClient, TcpClient> clientConfigurer, ReactorNettyCodec<byte[]> codec) {
        super(clientConfigurer, codec);
    }

    /**
     * Instantiates a new Msg center reactor netty tcp client.
     *
     * @param tcpClient the tcp client
     * @param codec     the codec
     */
    public MsgCenterReactorNettyTcpClient(TcpClient tcpClient, ReactorNettyCodec<byte[]> codec) {
        super(tcpClient, codec);
    }
}
